package handler;

import com.lmax.disruptor.EventHandler;
import com.lmax.disruptor.WorkHandler;

/**
 * EventHandler 单生产模型
 * WorkHandler 多生成者模型
 * @param <T>
 */
public abstract class AbstractConsumerEventHandler<T> implements EventHandler<T>{

    @Override
    public void onEvent(T t, long l, boolean b) throws Exception {
        onEventHandler(t);
    }

    public abstract void onEventHandler(T t) throws Exception;
}
